package com.shangxia.monomer.study.designPatterns.behavioralType.state.demoSed;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.yaml.snakeyaml.events.Event;

/**
 * @ProjectName: monomer
 * @ClassName: Work
 * @Time: 2021/8/6
 * @Author: zhouy
 * @Description:
 * @Experience:
 */

@Slf4j
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Work {
    private Integer hour;
    private WorkState workState;

    public void writeProgram() {
        if (null != workState) {
            workState.writeProgram(this);
        } else {
            System.out.println("Go Die");
        }

    }
}
